import {RouteConfig} from 'vue-router'

import MainLayout from "@/core/layouts/MainLayout.vue";

/**
 *全局路由配置
 */
export const router_const_1 = [
    {
        path: '/',
        name: 'index',
        component: MainLayout,
        meta: {title: '首页'},
        redirect: '/system/DictList'
    },
    {
        path: '/system',
        name: 'system',
        redirect: '/system/UserList',
        component: MainLayout,
        meta: {title: '系统管理', icon: "table"},
        children: [
            {
                path: '/system/UserList',
                name: 'UserList',
                component: () => import('@/views/system/UserList.vue'),
                meta: {title: '用户管理'}
            }, {
                path: '/system/DictList',
                name: 'DictList',
                component: () => import('@/views/system/DictList.vue'),
                meta: {title: '字典管理'}
            }
        ]
    },
];

export const initRouters = [
   {
        path: '/error',
        hidden: true,
        redirect: '/',
        component: MainLayout,
        children: [
            {
                path: '/error/403',
                name: '403',
                meta: {title: '403'},
                component: () => import('@/views/error/403.vue'),
            }, {
                path: '/error/404',
                name: '404',
                meta: {title: '404'},
                component: () => import('@/views/error/404.vue')
            }, {
                path: '/error/500',
                name: '500',
                meta: {title: '500'},
                component: () => import('@/views/error/500.vue')
            }
        ]
    }
];

export const routerList: RouteConfig[] = [
    ...initRouters,
    ...router_const_1
];

